<?php

namespace App\Http\Requests\Logic\Company;

use Illuminate\Foundation\Http\FormRequest;

class SyncModules extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return isManager();
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
        	'modules' => 'required|array'
        ];
    }

	public function messages()
	{
		return [
			'modules.required' => '必须选择模型',
			'modules.array' => '参数必须是数组',
		];
    }
}
